-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Slow TF2T #659
Added Slow TF2T #659
Conversation
|
||
name = 'Slow Tit For Two Tats' | ||
classifier = { | ||
'memory_depth': 2, # Four-Vector = (1.,0.,1.,0.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The # Four-Vector = (1., 0., 1., 0.)
isn't needed anymore.
This is looking good @ranjinidas! Thanks! We're still missing a couple of tests, we'd be happy to help:
Whatever you would prefer :) Also, as a side note. I think (although I'm not sure) the errors you were having might have been because the doctests failed half way through and there were some files written that were not deleted... That's just a hunch though: they all passed fine on travis (a system hooked in to github that runs the test suite for every PR). |
|
||
class SlowTitForTwoTats(Player): | ||
""" | ||
A player that plays [c,c], then if the opponent plays the same move twice, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we write "A player that plays C twice, ...". This is not terribly important: just looks nicer to me :)
Hi @drvinceknight, thanks for reviewing this! I have a test written but can check with you or someone else on Gitter before adding it in. |
Awesome: I'm online now if that's helpful :) |
|
||
def strategy(self, opponent): | ||
#Play [c, c] | ||
if len(self.history)<2: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tiny bit of PEP8:
if len(self.history) < 2:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added this in! Thanks!
This looks great to me! 👍 I've left one very minor PEP8 comment. We have a two core dev review policy so once one of the others has taken a look (and possibly added their own comments etc) this will go in :) Thanks a lot for working on this. |
|
||
def strategy(self, opponent): | ||
|
||
#Play [c, c] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Start with two cooperations
Looks good to me, we can sweep up any PEP8 issues sometime later. |
Corrected strategy from last pull request.